GtkModelMenuItem: set initial accessible role
authorMatthias Clasen <mclasen@redhat.com>
Sun, 5 Jan 2014 04:15:40 +0000 (23:15 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 5 Jan 2014 04:15:40 +0000 (23:15 -0500)
The initial state of GtkModelMenuItem is that of a normal menu
item, but the accessible we are using, GtkCheckMenuItemAccessible,
starts out with a role of 'check menu item'. Fix that up by
explicitly setting the initial accessible role.

gtk/gtkmodelmenuitem.c

index 2235ff7e68d8105cc5caa98cf02f49bb75a06119..bb5210cf65a28c154e89120968611b6a421038ae 100644 (file)
@@ -356,6 +356,8 @@ gtk_model_menu_item_class_init (GtkModelMenuItemClass *class)
   g_object_class_install_property (object_class, PROP_ACCEL,
                                    g_param_spec_string ("accel", "accel", "accel", NULL,
                                                         G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
+
+  gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (class), ATK_ROLE_MENU_ITEM);
 }
 
 GtkWidget *